finish up alignment refactoring and fixing
Merge pull request #1463 from WalterBright/b3

finish up alignment refactoring and fixing