refactored import of books into controller; general refactoring