Add partially refactored source. Add very simple CMake file. To use, install CMake, and do: cmake . ; make ; ./main