Move script tag to bottom of body.
Replace setTimeout with setInterval.