Updated hasPattern, createTimer, and clearTimer.