Improved indexing process and mappings. This change helps to close #3 and #4.