Removing usage of deprecated methods and classes