Fix deprecations and whitespace