Remove unused code in main class