Welcome jmsrajeev

That seems a bit much to expect people to read. I suggest you work on one question at a time.
Post the relevant code with the original question, and your question about it/them