some smaller improvements

maybe later improving the sorting stuff. ;-)