Bugfix in delPlain, fix go fmt

Hadn't noticed that a previous commit didn't format the code properly
until today. It's ok now - maybe I was tricked by Github's UI.

The delPlain function now checks the length of keys before referencing
its members, preventing panics.