refactor: refactor all that lexical binding craziness

also fix some bugs, probably more outstanding
fix: lower trace level
fix: big bug