Application structure refactored with requirejs