Allow non-string primitives to be set by val/text
Add support for host objects in older environments
Minor cleanup