Fixed the console behaviour.

You can now freely enter and quit the console in both modes.

I also removed the useless mode manager reference in the console
class and some dead code.