Begins refactoring Gantt generateHTML function