Series of attacks kills 31 in Iraq