Keep track of subterms automatically, for shame

Signed-off-by: Michael Livshin <dev@cmm.kakpryg.net>