Cleaned up the main a little.