refactor requirejs risky code (routes, serializers, views)