Fixed a bunch of annoying deprecation notices

Change-Id: Ic2eb0ea94d8e27574f7dc76f1b448ccd6c01bb98