Allow for some console hacking

It's sometimes handy to fire up a console in the project root and try some stuff.
This pull request fixes some `NameError`s that currently occur.