Various small improvements