Replacing Arraylist with Hashset, Formatting