Fixed some bugs, changed some things