refactored console - ready for thread/serverd runner