Added setting a refresh time to preference