That huge wall of text will be impossible for anyone to help you with. Please read how to properly format your code so people can read it. It's also very difficult to understand precisely what the problem is.