refactored stages and added text input for chat
updated gleany