If-elif-else cleanup