Implementing the library
in a correct way.
Api written + testcode added.