Refactor book model