Move code from Testing branch.