Refactor build_index
Merge pull request #4 from miquelbarba/refactor_collection

Refactor build_index