Cleaned up the main class file.