Replace ArrayLists with direct arrays
Use strings instead of UTF-8 in Text class
Text
Stroe base URIs in a WeakHashMap
WeakHashMap