Refatoring for RequireJS multicomponent