Fix serialisation and generic type parameterisation warnings.