Various improvements

Various improvements