Removed switch statement in favour of more efficient lookup
-Use requirejs server side
-Directory structure clean up