Started writing a function finding G, but didn't finish. Function is located at the top of system.cpp, but is commented awaym.