misc: refactor a ton of duplicated transforms