Made some minor changes, attempted to fix some bugs, fixed a few