Align works with both envelope and trace

Refactored Align and TwoD.Align take take a default record. Allows function to use trace instead of envelope for all Align functions, plus the ability to add other types of boundaries.