Cleanup main

Some cleanup in main