Deprecation and undeclared warnings tweaks.

Sorry about first pull request (no idea what happened was just totally wrong).