cleanup main.cpp