Drastically reduce CPU usage

While loops are bad :(