Code prettiness changes to scheduler