Move leader election back into __init__