cleaned up content script code