Fixes #67: reworked how maps are parsed

Includes some other enhancements to the JSON package.

(Also includes some work on the RBuddy fragments)