Quick refactor.
Replace setTimeout with request. Appears to work.