private Map<String, Element> gatherCCSSResults() {
        
        Map<String, Element> results = new HashMap<>();

        String sql = "SELECT "
                + "  MSP.projectID "
                + ", MSP.siteID, BS.disname, BS.schname "
                + ", BC.gradeLevel "
                + ", BC.subjectArea "
                + "FROM `bank_collector` AS BC "
                + "LEFT JOIN `map_sample_collector` AS MSC ON MSC.collectorID = BC.id "
                + "LEFT JOIN map_collector_site MCS ON MCS.collectorID = MSC.collectorID "
                + "LEFT JOIN map_site_project MSP ON MSP.siteID = MCS.siteID "
                + "LEFT JOIN bank_site AS BS ON BS.id = MSP.siteID "
                + "WHERE BS.active = 'y' "
                + "AND MSP.active = 'y' "
                + "AND MCS.active = 'y' "
                + "AND MSC.active = 'y' "
                + "AND BC.active = 'y' "
                + "AND MSP.projectID = 23401520791814151  "
                + "GROUP BY BS.disname, BS.schname, BC.gradeLevel, BC.subjectArea "
                + "ORDER BY BS.disname, BS.schname, BC.gradeLevel, BC.subjectArea ";

        ResultSet rs            = DM.Execute(sql);

        String curSiteID        = "";
        String curGradeLevel    = "";
        String curSubjectArea   = "";
        String curProjectID     = "";

        boolean start           = false;
        
        Element curSchool       = null;
        Element curGrade        = null;
        Element curSubject      = null;
        
        Element holder          = base.CreateSection("School Results");

        try {
            rs.beforeFirst();

            while (rs.next()) {
                 
                curProjectID = rs.getString("projectID");
                
                // Initial NULL cases
                if (curSchool == null) {
                    curSiteID = rs.getString("siteID");
                    curSchool = base.CreateSection(rs.getString("schname"));
                    curSchool.appendChild(base.PullExternal(props.getProperty("file.inbase") + "insert_files/CCSS_filler.txt"));
                    System.out.println("\nSchool: " + rs.getString("schname"));                        
                }
                
                if (curGrade == null) {
                    curGradeLevel = rs.getString("gradeLevel");
                    curGrade = base.CreateSection("Grade " + rs.getString("gradeLevel"));
                    curGrade.setAttribute("bump", "true");
                    curGrade.appendChild(base.PullExternal(props.getProperty("file.inbase") + "insert_files/grade_filler.txt"));
                    
                    System.out.println("\tGrade: " + rs.getString("gradeLevel")); 
                    
                    curGrade.appendChild(
                            base.Base().ImportFragmentString(
                                createChart(
                                     "Grade Level Analysis"   
                                    , curProjectID
                                    , curSiteID
                                    , curGradeLevel
                                    , "gla"
                                )
                            )
                        );   
                        
                    curGrade.appendChild(
                            base.Base().ImportFragmentString(
                                createTable(
                                    curProjectID
                                    , curSiteID
                                    , curGradeLevel
                                    , curSubjectArea
                                )
                            )
                        );                         
                }  
                
                if (curSubject == null) {
                    curSubjectArea = rs.getString("subjectArea");
                    curSubject = base.CreateSection(rs.getString("subjectArea"));
                    curSubject.appendChild(base.PullExternal(props.getProperty("file.inbase") + "insert_files/subject_filler.txt"));
                    System.out.println("\tSubject: " + rs.getString("subjectArea")); 
                    
                    
                    
                }                 
                
                // Running checks
                if (!curSubjectArea.equals(rs.getString("subjectArea"))) {

                    curGrade.appendChild(curSubject);                    
                    curSubject = base.CreateSection(rs.getString("subjectArea"));
                    curSubject.appendChild(base.PullExternal(props.getProperty("file.inbase") + "insert_files/subject_filler.txt"));

                    System.out.println("\t\tSubject area: " + rs.getString("subjectArea")); 
                    System.out.println("\t\t[Generate CR for " + rs.getString("subjectArea")  +"]");
                    
                    curGrade.appendChild(
                        base.Base().ImportFragmentString(
                            createChart(
                                  String.format("Cognitive Rigor: %s (Grade %s)",curSubjectArea , curGradeLevel) 
                                , curProjectID
                                , curSiteID
                                , curGradeLevel
                                , curSubjectArea)
                        )
                    ); 
                    
                    curGrade.appendChild(
                        base.Base().ImportFragmentString(
                            createTable(
                                curProjectID
                                , curSiteID
                                , curGradeLevel
                                , curSubjectArea
                            )
                        )
                    );                    
                }
                 
                
                if (!curGradeLevel.equals(rs.getString("gradeLevel"))) {

                    curGrade.appendChild(curSubject);
                    curSchool.appendChild(curGrade);                    
                    curGrade = base.CreateSection("Grade " + rs.getString("gradeLevel"));
                    curGrade.setAttribute("bump", "true");
                    curGrade.appendChild(base.PullExternal(props.getProperty("file.inbase") + "insert_files/grade_filler.txt"));

                    System.out.println("\tGrade level: " + rs.getString("gradeLevel"));
                    
                                       
                    curGrade.appendChild(
                        base.Base().ImportFragmentString(
                            createChart(
                                  "Grade Level Anlaysis"
                                , curProjectID
                                , curSiteID
                                , curGradeLevel
                                , "gla")
                        )
                    ); 
                    
                    curGrade.appendChild(
                        base.Base().ImportFragmentString(
                            createTable(
                                curProjectID
                                , curSiteID
                                , curGradeLevel
                                , curSubjectArea
                            )
                        )
                    );                     
                }               
                
                                
                
                if (!curSiteID.equals(rs.getString("siteID"))) {

                    curGrade.appendChild(curSubject);
                    curSchool.appendChild(curGrade);
                    holder.appendChild(curSchool);
                    
                    curSchool = base.CreateSection(rs.getString("schname"));
                    curSchool.appendChild(base.PullExternal(props.getProperty("file.inbase") + "insert_files/CCSS_filler.txt"));

                    curSchool.setAttribute("bump", "true");
                    System.out.println("\nSchool: " + rs.getString("schname"));                    
                }
                
                curSiteID = rs.getString("siteID");
                curGradeLevel = rs.getString("gradeLevel");
                curSubjectArea = rs.getString("subjectArea");
            }
            
                        
            curGrade.appendChild(curSubject);
            curSchool.appendChild(curGrade);
            holder.appendChild(curSchool);

        } catch (SQLException ex) {
            Logger.getLogger(CCSS_builder.class.getName()).log(Level.SEVERE, null, ex);
        }
                
        results.put("data", holder);

        return results;
    }