Modified CMakeLists, corrected formulas for phi