Added metadata save and update functionality