cleanup and moved dedicated to terminal only mode on win