Moving JS to requirejs