some cleanup and filtering by category