Fix warnings

Removes warnings that are created in the master branch. Adds types to a couple of generic objects, and changes a deprecated method call.