Tiny fixes in inmemory and filesystem driver

It consists of go-style fixes and tiny optimizations.