Replace storeIndex += 1 with storeIndex++ as per golint
Add comments to the public types and functions