remove variables that are never read from and/or never written to
folding for switch and return statements