Ironed out a few bugs and also renamed quite a few things.