Migration to requireJS modules