Remove obsolete code to handle documents