Changed Hashtable to ArrayList for messages since the order matters.