private void generateSongStructure(File songsDirectory) {
        songList.getItems().clear();

        for(File songFolder : songsDirectory.listFiles()) {
            //Check that only directories are processed
            if(songFolder.isDirectory() || songFolder.listFiles() == null) {
            	if(!songFolder.canRead()) {
            		InfoDialog errorDiag = new InfoDialog("Could not read from chosen folder");
                    errorDiag.show();
                    return;
            	}
                //Find .osu files in folder and process them
            	try {
	                for(File osuFile : songFolder.listFiles()) {
	                    int indexOfExtension = osuFile.getName().lastIndexOf('.');
	                    if(indexOfExtension == -1)
	                        continue;
	                    String extension = osuFile.getName().substring(indexOfExtension);
	                    if(extension.equals(".osu")) {
	                        songList.getItems().add(new OsuFile(osuFile));
	                        break; //We only need one .osu file per song folder
	                    }
	                }
            	}
            	catch(Exception e) {
            		InfoDialog errorDiag = new InfoDialog("Could not read from chosen folder");
                    errorDiag.show();
                    return;
            	}
            }
        }
        //Check that there was any songs found at all
       if(songList.getItems().isEmpty()) {
           InfoDialog errorDiag = new InfoDialog("Could not locate any songs, are you sure you chose the osu/songs folder?");
           errorDiag.show();
       }
        else {
           //Entries on the list should be compared alphabetically by title
           Comparator<OsuFile> compare = new Comparator<OsuFile>() {
               @Override
               public int compare(OsuFile o1, OsuFile o2) {
                   return o1.meta.getSongname().compareTo(o2.meta.getSongname());
                   }
           };
           FXCollections.sort(songList.getItems(), compare);
       }
    }