Add AMD module definition and alignment option.
Refactor.