Merge pull request #231 from jaredbischof/master

Debugging nil pointer error.
Merge pull request #232 from jaredbischof/master

Fixed.
Edit to avoid race condition when adding indexes to Shock node mongo documents.