Misc small improvements