Properly setting hash for templates

Also removed w.currentDocId from delegator calls.