It's a lot of reading, and I have no idea what your question is . . . well, I gave up somewhere in paragraph #3. Can you just ask a short question without the story?

What are you trying to do? ...