Replaced deprecated methods

Removed deprecated code