Added main mode class