Refactor spec
JSON events