Removed use of deprecated methods.