replace attrdict with a simpler, faster version

Also use from_json for schema().