Requirejs

Basic work moving everything to RequireJS is complete.