Updates for using the run loop correctly