Update deprecated methods and remove unneeded