Use raw JS objects instead of immutable
Put recorder into separate module