Pagination

Added pagination.
There's a lot of changes in application.js because I ran JSFormat.