Code cleanup for "Reading from a slave and Writing to a master"