Sorted out AMD, common.js, etc.