Added fully functional main viewport selection and RMSD support