Updated README
Refractoring.
Fixed firefox specific bug.