Deprecation and style fixes