Added mode initialization