Cleaned up the code a bit and tried to solve some issues, but seems it's having none of it... I might have to resort to webworkers or split things up a bit more. I fear that the delay thing is causing some problems...