Made things serializable
Fixed merge