Changed from procedural to OO for content.js