Fixed some bugs, added some stuff