fixed a memory leak where consoles where not properly destroyed.
Various updates