Clean up if/else nonsense