cleanup and making slaveonly work