Adding serialization of scalars and composites for base case