Clean up Reference class a bit.

* Fix some documentation errors.
* refactor Format function to avoid copying strings repeatedly with .Replace
Fix typo.
Forgot Java
Merge pull request #81 from AnalyticalGraphicsInc/referenceCleanup

Clean up Reference class a bit.