Adds Serializable interface to relevant types.