Fixies. Add function to set hits per page. Still needs cleanup