Remove old code from templates