cleanups and some reversions