Added local input queue to ASR and refactoring.