Various fixes and features

These patches fix bug #623, implements enhancement #612, and implements features required for enhancement #626 in Gobby.