Refactor parseObject a bit more
Refactor parseArray
Unify parseObject and parseArray