Finitely generated graded modules over $K[x]$ I need some help on this exercise from A Course in Ring Theory by Donald S. Passman

Find all finitely generated graded $K[x]$-modules up to abstract isomorphism. Remember, $K[x]$ is a principal ideal domain.

The result is supposedly similar to the well-known structure theorem in the non-graded case.
So let $M$ be a finitely generated $K[x]$-module with a minimal generating set of homogeneous elements $\alpha_1, \ldots, \alpha_n$ with $d_i$ the degree of $\alpha_i$ (such a set exists because every element of M is a sum of homogeneous elements). We then get a surjective graded homomorphism $$\phi \colon K[x](d_1) \oplus \ldots \oplus K[x](d_n) \to M,\;e_i \mapsto \alpha_i,$$ where $K[x](d_i)$ denotes the graded module $K[x]$ with its grading shifted upwards by $d_i$ and $e_i = (0,\ldots,1,\ldots,0)$. So the homomorphism theorem for graded modules states that $M$ is - as a graded $K[x]$-module - isomorphic to $$\left(\phi \colon K[x](d_1) \oplus \ldots \oplus K[x](d_n)\right)/\ker(\phi).$$
How do I go on now?
Obviously $\ker(\phi)$ is a graded submodule of something like a free-graded $K[x]$-module. Is there maybe an analogue to the elementary divisors theorem for the graded case which lets me express this quotient in a nice way ?
Thanks for helping me out!
 A: Let $M$ be a finitely generated $K[x]$-module with the set of generators $\{b_i\}$ of minimum cardinality. Let $K[x]^n$ be the free graded $K[x]$-module of rank $n$ with the standard grading and basis $\{e_i\}$. 
Now define a homomorphism of modules $\phi:K[x]^n \rightarrow M$ by setting $\phi(e_i)=b_i$. Since $\{b_i\}$ generates $M$ this is surjective and by the First Isomorphism Theorem for modules we have $K[x]^n/\ker{\phi} \cong M$. Since $K[x]^n$ is a free module over a PID of finite rank, and $\ker{\phi}$ is a submodule, than $\ker{\phi}$ is free of rank $m\leq n$, and moreover there is a basis $\{y_i\}$ of $K[x]^n$ such that $a_1y_1, a_2y_2, ..., a_my_m$ is a basis for $\ker{\phi}$, for $a_i \in K[x]$. One can find a proof of this in Dummit & Foote - Theorem 4 (p. 371), and a lot of other places. It is also evident that $(a_i)$, for $1 \leq i \leq m$, are ideals in $K[x]$, and since it is a graded PID they are of the form $(x^n)$.
Now we define a surjective homomorphism $\varphi$
$$\varphi: K[x]y_1 \oplus \cdots\oplus K[x]y_n\rightarrow \Sigma^{\deg(y_1)}K[x]/(x^{q_1}) \oplus \cdots\oplus \Sigma^{\deg(y_m)}K[x]/(x^{q_m}) \bigoplus_{i=1}^{n-m} \Sigma^{\deg(y_{m+i})}K[x]$$
by mapping $(\alpha_1y_1,...,\alpha_my_m) \rightarrow (\alpha_1\bmod(x^{q_1}),...,\alpha_m\bmod(x^{q_m}),\alpha_{m+1},...,\alpha_{n})$.
$\Sigma^n$ is an $n$-shift upward in grading.
Now the kernel of $\varphi$ is obviously $K[x]x^{q_1}y_1\oplus \cdots \oplus K[x]x^{q_m}y_m$ which is isomorphic to $\ker \phi$, and therefore the image of $\varphi$ is isomorphic to $M$: $$(\bigoplus\limits_{j=1}^{m} \Sigma^{\deg(y_j)}K[x]/(x^{q_j})) \oplus (\bigoplus\limits_{i=1}^{n-m}\Sigma^{\deg(y_{m+i})}K[x])\cong M.$$
