fix bug in CascadingLocal tests causing the buffer to not be flushed

Issue #30
simplify RestClient#index (and fix a bug in the process)
update build file
Merge remote-tracking branch 'upstream/master'