Fix deprecated method call, remove empty lines.