Removed use of deprecated function and soon to be deprecated class.