I just about tossed my cookies seeing all those useless Strings, where perfectly good const char *s could be used, instead.
I really don't understand what you are trying to do that the code doesn't currently do.
If you explain, using terms in the code, perhaps it will become clear(er).