done in the input cleanup branch, see below