Initial document writer

Begun work on #5 non-eager updates