bug 1005890, some technical follow-ups to make mothball more useful, r=peterbe