Replaced occurrences of String[] with ArrayLists