Fix numerous issues and ensure that tests pass on minimum requirements.