Made main.cpp file generate function cleaner.