Feature/upgrade javascript to use requireJS