More JSLint fixes
Added a short example.
Added simple error tracking to rest methods.