term resolution and most hooks in; TODO: finish from manager2; #51