add meta and/or instanceID nodes if these do not exist, closes #7