Updated main.cpp to copyleft