clean() method useful when there are mutually exclusive branches. (Rather hacky)