Tidied code, added comments etc.

Fixed a few bugs.

No manual yet, but it will come soon.

This version works as expected. Tested on 4.1.5

Add the plugin to the page using TS, add some Customer Reference records, and add the plugin to a page.