added moveToMaster and swapToMaster, cleaned some stuff also