formatting.
moved some bounds code to outer scope.
moved methods up in scope.  named some anonymous methods.  reformatted some code.
named some anonymous functions