Documented chrome extension and polishing JS code