change up amd stuff so it works with r.js