Removed all references to int index (useless, use arraylist.size())