Cleaned up the main class