remove debug logging and dead code