more fixes
clean up code
clean up code
fix according to code review and fix broken examples
fix according to code review
Merge pull request #291 from metamx/more-fix

Additional fixes required to get the indexing service to work