Changed to Cmake and added gtest support