fixed api calls to include pagination
code cleanup