Switched scope nesting paradigm to a more JS vibe.
Systematic debug output. Oh for a real debugger...