Removed unused variable, added message history variable.