Refactor and add interval updates.