Import original code from trunk.