* Added to_json.
* Small fixes.