Add method to deserialize, and another to set the action
Update tests