Refactor of json.Unmarshal implementations in plan package