Add library + tests
Merge pull request #1 from widop/f-lib

Add library + tests