added chat.php to handle the interface for the chat messages.
cleaned up the code on the index.php file. It didn't affect the interface in any way.