Lots of edits, updates and documentation.