Added some debug/visualization stuff.