Serialiser improvements and tests