cleaning up some main