Support AMD pattern

Add support to use on AMD pattern for those that are using it.
Includes PR #2 (You can merge either one you think it's necessary)