Use of StringTokenizer minimized. String interning done.
String interning remained. ArrayList<Integer> replaced with HashMap<Integer, Integer>.