Move removal of imports from body to process_imports
Inline script tags