You might find it helpful to read this thread on posting code, especially post number 5.
You need to remove the extraneous code before posting. Other people don’t know what is relevant and what is not, so it’s up to you to provide a clean example to work from.