Optimizations and gantt chart fixes