Some more improvements

(details in each commit)