Initial check-in. Slave support added