cleanups, removed unused vars