Seperated the Library into a Repository and a Service