several smaller improvements