Fixed and modified a bunch of stuff