Working on tests and getting a large part of the functions to work