fix unused variable warning w/o debug, remove old debug code