Changed header file to add NSError to method calls, and updated tests to reflect the changes