Devided Slave.java to two parts -- auto-generated part and manual part.