Done most of the light building algo