use to_hash and to_json
fixed certificate check
added settings object to config spec