Remove some obsoleted extensions. Move methods to Document class.