Slight content.js refactoring