Adapted some functions for slave comms