Undo some of the work I did with exceptions

Must revisit
Don't use closures for definitions. Also use cwd

Closures were really just a temporary step while I worked on the DI component.

Setting and then used the cwd makes everything more readable.