fix variable names (copy&paste error)
cleanup
add working REST API example (issue #33)