some refactoring and working book view code

closes #73