Fixed a few things, Final version