Separate master and slave scripts