remove several usages of deprecated code
fix code narc reporting