complete rewrite of codebase in using AMD/RequireJS and no jQuery