Changed Naming of some variables, moved code around, and added some xml documentation. Was sort of done everywhere in the code. Will try to do it more methodically next time.