Refactored Chrome plugin