Fixed manifest version 2 compatibility issues:
- updated the manifes file.
- extracted inline JS code into a separate JS file.
Fixed options.html to comply with the version 2 of the manifest.json.