Fix missing error handling, gofmt

Hi,

here are some missing error handlers and ~100 gofmt fixes