Corrected failing tests, and applied benvan's review comments