Add support for AMD and make some updates to use the a Module type