Use requirejs to manage dependencies for core logic
Put insert and require into own util module; Fix running tests using grunt-contrib-qunit