Working towards API calls

Initial Delegator with entity lookup and validation.
Added loadDocument and getDocument methods to Writer.
Fixed bug with entity brackets not showing.