Added new tests and improved the functionality of failing tests.