Tweaked a few things and fixed a couple of errors