Adds back the connection to the console

And some clean-up