Formatting.
Fixes #146.

Use '|' as the delimiter.  This could still present a problem for someone using '|' in a project name etc, but let's not worry about that happening for now.
Refactor, including:

* remove the duplication which existed in the removed js file
* white space/naming/formatting changes.
Merge pull request #147 from aodn/issue_146

Issue 146