Changes in conversation logic

1. Added support for conversation logic
2. Some bug fixes