Update main.cpp

Changed to updated version of main, includes enums and few syntax changes