Tiny fixes in inmemory and filesystem driver

It consists of go-style fixes and small optimizations.