Refactoring old code by using newly added class methods
Removed deprecated class methods