Added a base handler to minimise code repetition. Added different handler methods for public/users. Added global page size variable.