Remove use of deprecated methods