public void loadFile() {		
		ProjectView pv = frame.getProjView();
		
		if(projFile != null && pv != null) {
			frame.setTitle("Wilds Dining Hall - " + projFile.getName());
			
			System.out.println("Loading " + projFile.getName());
			
			clearItems();
			
			try {
				FileInputStream in = new FileInputStream(projFile);
				InputStreamReader isr = new InputStreamReader(in);
				BufferedReader br = new BufferedReader(isr);
				
				String what = "";
				String line = br.readLine();
				while(line != null) {
					if(!line.trim().equals("")) {
						if(line.equals("General")) what = line;
						else if(line.equals("Teams")) what = line;
						else if(line.equals("Counselors")) what = line;
						else if(line.equals("Tables")) what = line;
						else if(line.equals("Partners")) what = line;
						else if(line.equals("TablePartners")) what = line;
						else if(what.equals("General")) {
							if(line.startsWith("ProjViewWidth")) {
								line = line.split("=")[1];
								ProjectView.PROJ_VIEW_WIDTH = Integer.parseInt(line);
								
							} else if(line.startsWith("ProjViewHeight")) {
								line = line.split("=")[1];
								ProjectView.PROJ_VIEW_HEIGHT = Integer.parseInt(line);
								
							} else if(line.startsWith("TableWidth")) {
								line = line.split("=")[1];
								ProjectView.TABLE_WIDTH = Integer.parseInt(line);
								
							} else if(line.startsWith("TableHeight")) {
								line = line.split("=")[1];
								ProjectView.TABLE_HEIGHT = Integer.parseInt(line);
								
							} else if(line.startsWith("TableSpeed")) {
								line = line.split("=")[1];
								ProjectView.TABLE_SPEED = Integer.parseInt(line);
								
							} else if(line.startsWith("ProjViewBackground")) {
								line = line.split("=")[1];
								String[] color = line.split(" ");
								int r = Integer.parseInt(color[0]);
								int g = Integer.parseInt(color[1]);
								int b = Integer.parseInt(color[2]);
								ProjectView.PROJ_VIEW_BACK_COLOR = new Color(r, g, b);
							}
						} else if(what.equals("Teams")) { //[Team Name]=[Red value] [Green value] [Blue value]
							String[] teamData = line.split("=");
							String name = teamData[0];
							teamData = teamData[1].split(" ");
							int r = Integer.parseInt(teamData[0]);
							int g = Integer.parseInt(teamData[1]);
							int b = Integer.parseInt(teamData[2]);
							pv.teams.add(new Team(name, new Color(r, g, b)));
							
						} else if(what.equals("Counselors")) { //[Counselor name]=[Cabin name]:[Team Name]
							String[] counsData = line.split("=");
							String counselor = counsData[0];
							counsData = counsData[1].split(":");
							String cabinName = "";
							if(!counsData[0].equals("null")) {
								cabinName = counsData[0];
							}
							Team team = pv.getTeamByName(counsData[1]);
							pv.counselors.add(new Counselor(counselor, cabinName, team, null));
							
						} else if(what.equals("Partners")) {//[Conselors name]=[Partner name]
							String[] partners = line.split("=");
							Counselor c = pv.getCounsByName(partners[0]);
							if(!partners[1].equals("null")) c.setPartner(pv.getCounsByName(partners[1]));
							else c.setPartner(null);
							
						} else if(what.equals("Tables")) { //[Counselor name]=[Team name]:[X] [Y] [Width] [Height] [id]
							String[] tableData = line.split("=");
							Counselor c = pv.getCounsByName(tableData[0]);
							tableData = tableData[1].split(":");
							Team team = pv.getTeamByName(tableData[0]);
							String[] pos = tableData[1].split(" ");
							int x = Integer.parseInt(pos[0]);
							int y = Integer.parseInt(pos[1]);
							int width = Integer.parseInt(pos[2]);
							int height = Integer.parseInt(pos[3]);
							boolean fixed = pos[4].equals("true") ? true : false;
							String id = pos[5];
							
							Table newTable = new Table(c, team, x, y, width, height);
							pv.tables.add(newTable);
							newTable.setId(id);
							newTable.setFixed(fixed);
							
						} else if(what.equals("TablePartners")) {
							String[] tableData = line.split("=");
							
							Table t = pv.getTableById(tableData[0]);
							
							if(!tableData[1].equals("null")) {
								t.setPartner(pv.getTableById(tableData[1]));
							}
							
						}
					}
					
					line = br.readLine();
				}
				
				in.close();
				isr.close();
				br.close();
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			} catch(IOException e) {
				e.printStackTrace();
			}
			
		} else {
			System.out.println("Can't load! The file isn't defined, retard...");
		}
		
		pv.sortLists();
	}