On Reed-Muller and related quaternary codes