private ArrayList<Edge> getEdges() {
        try {
            //Get time, Connection and ResultSet
            Long time = System.currentTimeMillis();
            Edge edge = null;
            String sql = "SELECT FNODE#, TNODE#, TYP, VEJNAVN, VEJKODE, SPEED, LENGTH FROM [jonovic_dk_db].[dbo].[edges];";
            Connection con = cpds.getConnection();

            PreparedStatement pstatement = con.prepareStatement(sql);
            ResultSet rs = executeQuery(pstatement);
            time -= System.currentTimeMillis();

            System.out.println("Time spent fetching elements: " + -time * 0.001 + " seconds...");
            int i = 0;

            //Add edges to edge ArrayList, and count percentage for loading screen.
            while (rs.next()) {
                edge = new Edge(getNode(rs.getInt(1)), getNode(rs.getInt(2)), rs.getInt(3), rs.getString(4), rs.getInt(5), rs.getDouble(7)/(rs.getDouble(6)*1.15), rs.getDouble(7));
                edge.setMidNode();
                edges.add(edge);
                i++;
                edgesDownloadedPct += (double) 1 / 812301;
            }

            System.out.println("Total edges: " + i);
        } catch (SQLException ex) {
            printSQLException(ex);
        } finally {
            closeConnection(cons, pstatements, resultsets);
        }
        Collections.sort(edges);
        edgesDownloadedPct = 1;
        return edges;
    }