new BugController({'minBugs':10, 'maxBugs':50, 'mouseOver':'die'}); See example.html BugController constructor can optionally take an object of options. To make this js more async friendly, you can adjust the default options at the top of bug.js, and then instantiate at the bottom of the file as above. This will allow one to wrap the entire script in a closure to prevent any global window name spa