Made keyboard input asynchronous, which allows for killing of process by ctrl+c at any time.