More fixes and small improvements.