Remove replace function

Doesn't really improve things, and no docker-gen binaries with it.