add src files, tests and CMake