Updated if-else statement brace placement to maintain consistency. Removed unused function.