Integrated with new improved document model.
Merge branch 'master' of github.com:substance/composer into refactor

Conflicts:
	test/index.html
Removed debug output.