Add some more corrections and tests