FIxed documentation issue, added comments to simulate.nls code.