moving document Editor into separate namespace
fixing duplicate motions bug
splitting document editor into separate files