Alignment: code cleanup and some runtime optimizations.