Reduced items per page to just 10, deleted some redundant code too