Context rework

Reworks the context to make it part of a resource instance.
Removes resource from ValueFormatters to clarify purpose.
Renames object in resource to model.
probably should be a private method