private static void initialSetup() {
		SQLiteHandler sqlite;
		try {
			sqlite = new SQLiteHandler(Config.DATABASE);
		} catch (SQLiteException e) {
			e.printStackTrace();
			return;
		}
		
		// Create all the tables if they don't exist yet
		// This should only happen the first time the application is run on a computer
		try {
			sqlite.createTable(Config.DECK_TABLE, "ID,Name", "INTEGER PRIMARY KEY ASC,CHAR(50) UNIQUE");
			sqlite.createTable(Config.CARD_TABLE, "ID,DeckID,Weight", "INTEGER PRIMARY KEY ASC,INTEGER,INTEGER DEFAULT 0");
			sqlite.createTable(Config.SIDE_TABLE, "ID,CardID,Label,Text,Weight", "INTEGER PRIMARY KEY ASC,INTEGER,TEXT DEFAULT '',TEXT DEFAULT '',INTEGER DEFAULT 0");
			if (sqlite.select(Config.DECK_TABLE, "Name", "Name = ?", "Dictionary").isEmpty()) {

				sqlite.insert(Config.DECK_TABLE, "Name", "Dictionary");
				long id = sqlite.getLastInsertId();
				String deckid = String.valueOf(id);
				/*sqlite.insert(Config.CARD_TABLE, "DeckID,Weight", deckid + ",50");
				String cardid = String.valueOf(sqlite.getLastInsertId());
				sqlite.insert(Config.SIDE_TABLE, "CardID,Label,Text,Weight", cardid + ",,Word,50");
				sqlite.insert(Config.SIDE_TABLE, "CardID,Label,Text,Weight", cardid + ",,Definition,50");*/
				DictionaryIO dicOut = new DictionaryIO();
				Config.dictionary = dicOut.loadDictionary();
				int count = 0;
				for( Map.Entry<String, HashMap<String, ArrayList<String>>> word : ((Config.dictionary).getDictionary()).entrySet() )
				{
					count++;
					sqlite.insert(Config.CARD_TABLE, "DeckID,Weight", deckid + ",50");
					String cardid = String.valueOf(sqlite.getLastInsertId());
					for(Map.Entry<String, ArrayList<String>> type : word.getValue().entrySet())
					{
						String encodedkey = "";
						
						try {
							encodedkey = URLEncoder.encode(type.getKey(), "UTF-8");
						} catch (UnsupportedEncodingException e) {
							e.printStackTrace();
						}
						sqlite.insert(Config.SIDE_TABLE, "CardID,Label,Text,Weight", cardid + ",Word," + word.getKey()+"\n"+encodedkey + ",100");
						for(String definition : type.getValue())
						{
							try {
								encodedkey = URLEncoder.encode(definition, "UTF-8");
							} catch (UnsupportedEncodingException e) {
								e.printStackTrace();
							}
							sqlite.insert(Config.SIDE_TABLE, "CardID,Label,Text,Weight", cardid + ",Definition," + encodedkey +",50");
						}	
					}
					if(count%2000 == 0)
					{
						System.out.println(count);
					}
				}
				System.out.println(count);
			}
		} catch (SQLiteException e) {
			e.printStackTrace();
		} finally {
			sqlite.close();
		}

		/*try {
			sqlite = new SQLiteHandler(Config.DATABASE);
		} catch (SQLiteException e) {
			e.printStackTrace();
			return;
		}
		String alldefinition = "";
		int maxdefinitionlength = 0;
		int maxtypelength = 0;
		int maxwordlength = 0;
		System.out.println("Initializing dictionary table in database..");
		for( Map.Entry<String, HashMap<String, ArrayList<String>>> word : ((dictionary).getDictionary()).entrySet() )
		{
			for(Map.Entry<String, ArrayList<String>> type : word.getValue().entrySet())
			{
				alldefinition = "";
				for(String definition : type.getValue())
				{
					alldefinition += definition;
				}
				String toInsert = word.getKey() + "," + type.getKey() + "," + alldefinition;
				if (toInsert.length() > maxdefinitionlength)
				{
					maxdefinitionlength = toInsert.length();
				}
				if (type.getKey().length() > maxtypelength)
				{
					maxtypelength = type.getKey().length();
				}
				try {
					sqlite.insert(Config.DICTIONARY_TABLE, "Word,Type,Definition", toInsert);
				} catch (SQLiteException e) {
					e.printStackTrace();
				} finally {
					sqlite.close();
				}		
					
			}
			if (word.getKey().length() > maxwordlength)
			{
				maxwordlength = word.getKey().length();
			}
		}
		System.out.println("Dictionary initialized!");
		System.out.println("Max definition length " + maxdefinitionlength);
		System.out.println("Max type length " + maxtypelength);
		System.out.println("Max word length " + maxwordlength);*/
	}