fixed syntax error on the paginate function
changed the main layout to take pagination
added category view for search