Fixed some stuff, added some functions and stuff