Implement shutdown, input reading