Improve and cleanup view logic of books