Refactor part 1 - swaps arrays now defined by file extension alone