Now, as for the explaining of the code, perhaps these advices may help you reduce the complexity of your posts in the future.
First, avoid writing a wall of text. It discourages people. Try to write as little as possible, if possible.
Separate your text into paragraphs. It might even be good to use a blank line between paragraphs to increase readability. Believe me, it helps a ton. Find places to split your text into paragraphs! Force it, if necessary.
And lastly, try to show what you mean with code and simplify your explanation. Don't write "first I did X, then Y, then Z, and that caused A, and then B, and finally C. Then I tried D because I was bored but realized that E was better because of F...". Show your approach with code instead. Easier to read. Really. Chaining lots of things like that makes it hard to read. Split it. Write code, explain why you did it and what happened. Then do the next, and so on. It may be a little longer but it's easier to read.