fixed ui.bootstrap pagination compatibility issue; began cleanup of code in main.controller.js