Merged zoggy's changes.