I have some trouble filling in the details of this proof from Atiyah-Macdonald. In this result, the authors assume what follows:
1) $A = \oplus_{n=0}^\infty A_n$ is a Noetherian graded ring, and therefore $A_0$ is Noetherian and $A$ is a finitely generated $A_0$-algebra, generated by $x_1, \ldots, x_s$ of degrees $k_1, \ldots, k_s$ respectively.
2) $M = \oplus_{n=0}^\infty M_n$ is a finitely generated $A$-module, so in particular $M$ is Noetherian and $M_n$ are finitely generated $A_0$-modules.
3) $\lambda$ is an additive function (so $\lambda(M) = \lambda(N) + \lambda(M/N)$ for $N \subset M$) from finitely generated $A_0$-modules to the positive integers.
4) Lastly $P(M,t) = \sum_{n=0}^\infty \lambda(M_n)t^n$.

If $K_n, L_n$ are as in the proof, then I understand that $K = \oplus_n K_n$ and $L = \oplus_n L_n$ is the kernel and cokernel, respectively, of the homomorphism induced by multiplication by $x_s$. If $x_s$ has degree $k_s$, then that would mean $L = \oplus_n \dfrac{M_n}{x_sM_{n-k_s}}$ where $M_{n-k_s} = \{0\}$ for $n < k_s$ and so the first $k_s$ factors in the sum are simply $M_i$. In particular then $$P(L,t) = \sum_{n=0}^{k_s-1} \lambda(M_n)t^n + \sum_{n= k_s}^\infty \lambda(L_n)t^n.$$
After the authors set up the equations $$ \lambda(L_{n+k_s}) - \lambda(K_n) = \lambda(M_{n+k_s}) - \lambda(M_n) = 0$$ they multiply each such equation by $t^{n+k_s}$ and then sum over all $n$, which gives $$\sum_{n=0}^\infty \lambda(L_{n+k_s})t^{n+k_s} - t^{k_s}P(K,t) = \sum_{n=0}^\infty \lambda(M_{n+k_s})t^{n+k_s} - t^{k_s}P(M,t).$$ But now adding to both sides $\sum_{n=0}^{k_s-1} \lambda(M_n)t^n$ would make me obtain $$P(L,t) - t^{k_s}P(K,t) = (1-t^{k_s})P(M,t)$$ which is not correct since the authors obtain a difference of a polynomial $g(t)$. I can't seem to find my mistake. What exactly is $g(t)$ in that equation?
Also, I have another short question, which is related, about proposition 11.3 in the same book. $d(M)$ denotes here the pole at $t=1$ of $P(M,t)$.

The equation (2) becomes $(1-t^{k_s})P(M,t) = P(L,t) + g(t)$. Then I see that the pole of $P(L,t) + g(t)$ is of degree one less than the degree of the pole of $P(M,t)$, but how does one conclude $d(L) = d(M) - 1$ in this case?