Digvijay[Alone]: Some refactoring and fixing bug:all transition lines are removed when input is removed