Added more tests and refactored further on the Library class