Refactor book index controller