Minor cleanup

Small cleanup to have a more readable code and be more go idiomatic.