Added pagination and made the application more modular