Added chance() to API
Moved collision detection worker code to fix bug
Fixed debug mode throwing constant errors.