Added the num_reply field to thread and used hte updated field for the latest update. Also created triggers to update the time of thread update whenever a reply is made on the thread.