Added a first pass at background refreshing.