Cleanup of switch statements with default cases