Program now writes a xref section.
Fixed properties scoping error that caused some graphical elements not to appear.