Api reference

Fixed some examples, included output, cleanups.