Revert "Revert "various improvements / fixes""