Various fixes and small features.