added travis ci and clang-format. cleaned code.