changes to bookstore classes and factory