Refactored book and user search to remove redundancies