Corrected issue with failing tests and added new tests