Fixing examples

- Fixed and improved the examples 
- Added toString, hashCode and equals to the condition types.
- Cleaned up non-functioning serialisation.

Fixes #252