refactor book views to a single file that takes two hashes as views