Refactoring Book/Library and tests