Creating an Artificial Intelligence Library: Manipulating DOM elements with Timers, Sorting Arrays within Web Workers