Removed dead code from main