refactored to allow reuse in 5.44
refactored some more, and decided to modify 5.38 - just like i did with ch5-compiler.scm