Parse files with multiple root nodes; escape all escaped characters; parse custom variables.

All changes explained in the commits.