Fixed bugs, added a few things