Added computation of initial orientation for arms