REV: split project structure to lib and example