Implement major types 0 and 1

- Both serialization and deserialization
- Add tests as well