Added NanError functions and documentation.