issue #5057, refactor & remove deprecated warnings