Major Refactor for using Requirejs