Convert printlns to logging statements, put deletes of tracking temp tables back in.