Clean up main.cpp

Unexpected massive performance gains.