Added the serialisation constructors to the weight class