Improving gocoding practices

Breaking things up to be more readable