some cleanup in preparation for rewriting wyw to not be an unreadable abomination
merged