Various changes to get registration and view_pending to work.