Added a few upgrades to the chat window
merged with origin/new-agent-structure
Small bug fixes for use in indexing objects