remove deprecated and dead code