More Unity tests and fixes