Shared utils, partial input rewrite