Many small improvements to the class file