Require Modularization Refactor

Refactored project to be better separated by modifying the code to use RequireJS to load modules dynamically.