Made main program more functional (you can now create an array)