builds out most of reindex code.
Merge pull request #44 from birkin/master

builds out most of reindex code.