cleanups and warnings removed