Refactor create book