cleanups and temporal code