refactor

Changed all huge blocks of code to arrays.  Loop through arrays instead
of repeating code