split out random array creation into its own class, fix indentation