Refactoring deprecated methods.