some cleanups and changes