resolve context keys in eg. #if statements in handlebar templates
refactored init/update viewmodel
close doc before opening another
store current position on user document
Merge remote-tracking branch 'origin/master'

Conflicts:
	preview.js