remove debug code and warnings