Added CMakeLists and formatted code.