Revert "Switched to non-deprecated methods."

This reverts commit 9059c66aba3e9e035b709959c9b273c6d8c59dc7.