Fixed a scoping bug
Added some (crappy) basics for dot output