Many smaller improvements

Here's a bunch of small improvements I've came up so far while looking into smartcd.

Thanks for this nice tool!