Do a lot of improvements for slave.