Make "analysing" a boolean & calculate status in UI