Lots of changes.

Added the new discussion function and created a permalink function to
make a permalink from the discussion title.