Several fixes and improvements to book mode