remove code from headless