Usergrid 2611b

Formatting and cleanup in preparation for re-factoring. For USERGRID-2611.