Refactoring the Codebase to use JQM and jQuery