Fixed a deprecated method and includes
Changed some deprecated includes