Remove obsolete code, add EmptyDocument class.