minor cleanups, removed some dead code.