Fixed issues with misnamed objects and added RefIons back into script.