further cleanup of alignment functions