Improved some of the functionality moved a few things around