Refactored master, start of slave