tweaks
fix bad errors on non-string field lookups, and some small refactorings to clean up