fix search
fix spec
optimisations (cut down on category queries, cut down on expensive current_user query)