Deprecated API usage and other warnings resolved (fixes #828)