Performance improvement introducing hashsets instead of arraylist for tags