Maybe split up
Cleanup messy forking
Added base document commands