Initial commit: library and example