Refactor out requireJS