Cleanup if/elif/else structure