Added some functions and whatnot