More idiomatic Go + gofmt.
Added gob-friendly structs. Using gob to load/save index.