refactor alignment calculation
fix byte opcode bug
more alignment; couple bug fixes