Remove old code from emit loop