Could you maybe comment the code, so we have an idea what it is supposed to do?
Why such heavy use of Strings?