Made it more object oriented. Found out what the issue was with the Registry, and a few other changes. Again, I'm sort of bad at commenting this stuff.