a few code cleanups: inline redundant variables, tabs to spaces, constants for magic variables, cleanup imports, unused class, seed toArray with array of appropriate size, capitalization, variables for code clarity