Refactor and fix worksection content script