Start of new tests, minor bug fixes