add some inline godoc documentation, fix format