More reworking of galaxy.util to synchronize with Galaxy.