Added Pagination, Sorting and moved code to be modular using require.js