Please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum Your code is too long for me to study quickly without copying to a text editor.
It would also be a good idea to use the AutoFormat tool to indent your code for easier reading
...R