Code Updates.

Further code updates and removal of some depreciated methods and API usages.