First library version
Clean implementation of library