Add require.js lib and refactor existing views to work with it