Many bug fixes. Also account for bad level json