Added changes to NEWS and a few edits to documentation and clean up of code.