Fix id method, add perltidy

In general I don't understand why the json data can either be in /obj or /, which is probably the source of this bug in the first place. Why not just always store it in / ?