spell checking and some small improvements