First version of the library plus example code