cleaning up script injection mechanism