Added more code for function checks. Still a lot needs to be done, mostly wrote skeleton code.