Cleanups

I have run test on all my changes today, and optimized the code. Can't
see any bugs so far, and we are still the fastest one!! Even in Internet
Explorer