Removed unused code in main file