Simplify main.cpp
Code cleanup.