Serious cleanup of Main into one class file