Tweaked dialogue algorithm code. Seems like 95% of all dialogue situations have been tested, including extreme cases.
Forgot about input locking/unlocking scheme.
Refactoring the codes.
A bit more refactoring.