Index: trunk/src/scriptbuilder/structures/ScriptIncident.java
===================================================================
--- trunk/src/scriptbuilder/structures/ScriptIncident.java	(revision 164)
+++ trunk/src/scriptbuilder/structures/ScriptIncident.java	(revision 167)
@@ -296,23 +296,34 @@
         {
             t = new TimeSlice(start, this);
-            //t.addEvent(ev);
             slices.put(start, t);
         }
-        else
-        {
-            //t.addEvent(ev);
+        
+        //checks if event to add is an I_AudioEvent and if the I_AudioEvent already has an AudioEvent to connect with it
+        if(ev instanceof I_AudioEvent && t.getCorrespondingAudioEvent((I_AudioEvent)ev)==null){
+            
+            AudioEvent audio = (AudioEvent) ScriptEvent.factoryByType(ScriptEventType.AUDIO_EVENT);
+            
+            //checks to see if there is already a filename in the I_AudioEvent, if so, set the AudioEvent ID. This is because the ID is not stored within the Script itself.
+            if(!((I_AudioEvent) ev).getFileName().equals(""))
+            {
+                ((I_AudioEvent) ev).setID(((I_AudioEvent) ev).getFileName());
+            }
+            // checks to see if the I_AudioEvent already has an ID or not, if not, set one based on the audioEventCount. 
+            if(((I_AudioEvent) ev).getID().equals(""))
+            {
+                ((I_AudioEvent) ev).setID(number+Integer.toString(audioEventCount));
+                audioEventCount++;
+            }
+            //sets AudioEvent id to id of I_AudioEvent
+            audio.id = ((I_AudioEvent) ev).getID();
+            //sets I_AudioEvent filename to the AudioEvent id
+            ((I_AudioEvent) ev).setFileName(audio.id);
+            //sets the file path of the AudioEvent based on its internal id
+            audio.setAudioFilePathRelative();
+            //adds AudioEvent to the timeslice
+            t.addEvent(audio);
+            
         }
         t.addEvent(ev);
-        if(ev instanceof I_AudioEvent){
-            //should make a path and a different filename fields for the file itself. Either that or deal with the string separation each time
-            //needs a check for when we move I_AudioEvents in the incident, as to not make duplicate events.
-            String fileName = number+"/"+number + "" + audioEventCount;
-            AudioEvent audio = (AudioEvent) ScriptEvent.factoryByType(ScriptEventType.AUDIO_EVENT);
-            ((I_AudioEvent) ev).setFileName(fileName);
-            audio.setAudioFilePathRelative(fileName);
-            
-            t.addEvent(audio);
-            audioEventCount++;
-        }
         eventCount++;
 
Index: trunk/src/scriptbuilder/structures/events/I_AudioEvent.java
===================================================================
--- trunk/src/scriptbuilder/structures/events/I_AudioEvent.java	(revision 159)
+++ trunk/src/scriptbuilder/structures/events/I_AudioEvent.java	(revision 167)
@@ -11,8 +11,4 @@
  */
 public interface I_AudioEvent {
-    /**
-     * allows for the AudioEvent type to return if it is an audio event. Could be replaced by just using instanceOf I think
-     * @return 
-     */
     
     
@@ -21,4 +17,6 @@
     String getID();
     
+    void setID(String id);
+    
     void setFileName(String s);
     
Index: trunk/src/scriptbuilder/structures/events/CHPRadioEvent.java
===================================================================
--- trunk/src/scriptbuilder/structures/events/CHPRadioEvent.java	(revision 161)
+++ trunk/src/scriptbuilder/structures/events/CHPRadioEvent.java	(revision 167)
@@ -78,4 +78,10 @@
     
     @Override
+    public void setID(String id)
+    {
+        this.id = id;
+    }
+    
+    @Override
     public void setFileName(String s)
     {
Index: trunk/src/scriptbuilder/structures/events/AudioEvent.java
===================================================================
--- trunk/src/scriptbuilder/structures/events/AudioEvent.java	(revision 161)
+++ trunk/src/scriptbuilder/structures/events/AudioEvent.java	(revision 167)
@@ -44,5 +44,5 @@
 
     /**
-     * File path for the audio file.
+     * File path for the audio file. Perhaps should only be generated on save?
      */
     public String audioPath = "";
@@ -64,5 +64,7 @@
         audioPath = "audio/" + f + ".mp3";
     }
-    
+    /**
+     * sets audio path relative to the working directory using the id value.
+     */
     public void setAudioFilePathRelative()
     {
Index: trunk/src/scriptbuilder/structures/TimeSlice.java
===================================================================
--- trunk/src/scriptbuilder/structures/TimeSlice.java	(revision 162)
+++ trunk/src/scriptbuilder/structures/TimeSlice.java	(revision 167)
@@ -320,18 +320,15 @@
         }
     }
+    //these two following functions should not be necessary.
     /**
      * this method removes an audioevent that corresponds to the input I_AudioEvent. NEEDS VERIFICATION
      */
     public void removeCorrespondingAudioEvent(I_AudioEvent comparisonEvent){
-        String id = comparisonEvent.getFileName().split("/")[1];
+        String id = comparisonEvent.getID();
         for(I_ScriptEvent event : events)
         {
             if(event instanceof AudioEvent)
             {
-                System.out.println("removed an audioevent \n" + ((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4));
-                System.out.println(id);
-                System.out.println(id.equals(((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4)));
-
-                if(id.equals(((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4)))
+                if(id.equals(((AudioEvent) event).id))
                 {
                     System.out.println("the event was deleted");
@@ -342,11 +339,11 @@
         }
     }
-    public AudioEvent getCorrespondingAudioEvent(I_AudioEvent compariosonEvent)
-    {
-        String id = compariosonEvent.getFileName();
+    public AudioEvent getCorrespondingAudioEvent(I_AudioEvent comparisonEvent)
+    {
+        String id = comparisonEvent.getID();
         AudioEvent retVal = null;
         for(I_ScriptEvent event: events)
         {
-            if(event instanceof AudioEvent && ((AudioEvent)event).audioPath.split("/")[2].equals(id))
+            if(event instanceof AudioEvent && id.equals(((AudioEvent) event).id))
             {
                 retVal = (AudioEvent) event;
