Sort and HTTP status

Added sort options (sort by relevance/newest books), and HTTP status
codes for error handling.