private void initialise() throws IOException {
        // Reads the state of the ContactManager from a CSV File.
        BufferedReader CSVFile = new BufferedReader(new FileReader(fileName));
        String dataRow = CSVFile.readLine();
        
//        System.out.println(dataRow);
        
        // Reads each line until the end of the file.
        while (dataRow != null) {
            String[] stringArray = dataRow.split(",");
            
            
//            System.out.println(stringArray.toString());
//            System.out.println(stringArray[1]);
            
            // Checks to see if the line contains a contact or a meeting.
            int newID = Integer.parseInt(stringArray[1]);
            if(stringArray[0].equals("contact")) {
                if(stringArray.length > 3) {
                    loadContact(newID, stringArray[2], stringArray[3]);
                } else {
                    loadContact(newID, stringArray[2], "");
                }
            } else {
                
                // Deserialise the string into a Calendar Object.
                String[] dateArray = stringArray[2].split("/");
                Calendar newDate = new GregorianCalendar();
                newDate.set(
                        Integer.parseInt(dateArray[0]),
                        Integer.parseInt(dateArray[1]),
                        Integer.parseInt(dateArray[2]),
                        Integer.parseInt(dateArray[3]),
                        Integer.parseInt(dateArray[4]));
                
                
                // Deserialise the string into a contact set.
                String[] contactArray = stringArray[3].split("/");
                Set<Contact> newContacts = new HashSet<>();
                for(String eachIDasString : contactArray) {
                    Contact newContact = getContactFromID(Integer.parseInt(eachIDasString));
                    newContacts.add(newContact);
                }
                if(stringArray[0].equals("meeting")) {
                    loadFutureMeeting(newID, newDate, newContacts);
                } else if(stringArray[0].equals("pastmeeting")) {
                    loadPastMeeting(newID, newDate, newContacts, stringArray[4]);
                }      
            }                  
            dataRow = CSVFile.readLine();
        }
        CSVFile.close();
    }