consistent function returns, errors.New -> fmt.Errorf, more local, less global types