Assorted polishings, bugfixes.