Enforce memory alignment to improve performance of vector operations.  Also fixed bugs in an earlier optimization.