Given the function:
\[ f(x) = \begin{cases} \frac{(2x^2 - ax +1) - (ax^2 + 3bx + 2)}{x+1}, & \text{if } x \neq -1 \\ k, & \text{if } x = -1 \end{cases} \]
If \( a, b, k \in \mathbb{R} \) and \( f(x) \) is continuous for all \( x \), then the value of \( k \) is: