Merge wanelo's stuff in this-a way

plus some other opinionated tidying...