Update and rename main.cpp to wg.cpp