Code cleanup and commenting throughout.  Also added a small tweak to handling replies so they show up in the regular list after a little delay.