AMDfied the JS files