ValueError applied in tests, minor format fixes