Simplified how labels are obtained from windows