Removes println
Refactors saving index.