Refactor for deprecated methods.