Move book chooser code to separate file

gh-6