I don't know what convention is, but I would prefer all definitions to be placed at the top of the function, @seandst any preference?