Removing depreciated calls and warnings