Use a dict instead of an object to ease serialization.