Partial implementation of value serialisation code

* New buffer object to store values for later serialization
* Initial implementation for serializing quantities
* Many architectural changes ... more to come