Update alignment_of implementation and test