More Go idiomatic code