refactored example
clean
refactored lib
assume basepath is build dir