Several fixes and minor new features.