Use consistent style of reference and pointer type declaration
Add serialisation