Moved the AJAX call into a factory - Started basic pagination