Miscellaneous utilities. @author Asger Feldthaus <asf@cs.au.dk>