Add index computation
Merge branch 'memex' of github.com:giantoak/memexHack1 into memex