Added exception when parsing incomplete json files & cleaned parser with tests up