Cleaned up main a little bit