Final draft

* Unified `IdStateList` subtraction behaviour
* `to_hash` now works recursively across nested data structures
* Outputs pretty JSON