Made cosmetic changes and added pagination.