Various improvements from Slava