refactor diagnostics
refactor CMakeLists.txt
add .travis.yml