Among the foundational results in differential topology are the Morse lemmas:
 Suppose that $f\colon\, M\to \mathbb{R}$ is a smooth function on a closed manifold M, that $f^{−1}[\epsilon,\epsilon]$ is compact, and that there are no critical values between $\epsilon$ and $\epsilon$. Then $f^{1}(\infty,\epsilon]$ is diffeomorphic to $f^{1}(\infty,\epsilon]$.

Let $f\colon\, M\to \mathbb{R}$ be a smooth function on a closed manifold M, with no critical points on $f^{1}[\epsilon,\epsilon]$ except k nondegenerate ones on $f^{1}(0)$, all of index $s$. Then $f^{1}[\infty,\epsilon]$ is diffeomorphic to $X(f^{1}[\infty,\epsilon];f_1,\ldots,f_k;s)$ (for suitable f_{i}).
Here $X(M;f;s)$ for $f\colon\,(\partial D^s)\times D^{ns}\to M$ is M with an shandle attached by f.
In plain English, the Morse lemmas give us instructions for how to build M out of simple pieces, like a child would build a structure out of Lego blocks. The first lemma says "if f has no critical point, do nothing", while the second lemma says "if f has a critical point, glue in an appropriate handle".
One of the things that makes me feel that I don't understand Morse's lemmas as well as I would like to is that the conditions on the source and target of the Morse function f seem unnecessarily restrictive. Maybe we'd like M to be a manifold with boundary or with corners, or a stratified space, or an infinitedimensional somethingorother? Indeed, analogues of the Morse lemmas continue to hold (but how much CAN we relax our requirements on M?).
On the target side, what about if we want the target to be something other than $\mathbb{R}$? Circlevalued Morse theory and Morse 2functions deal with Morse functions to S^{1} and to R^{2} correspondingly, and are quite useful.
And so, in order to feel I have a bit more of a grip on the metamathematical conceptual framework of the Morse Lemmas, I'm very much interested in the following question:
Let $f\colon\, M\to N$ be a smooth function, with nondegenerate critical points (whatever that means in context). What conditions do I have to impose on M and on N to obtain reasonable analogues of the Morse Lemmas?
By reasonable analogues, I mean lemmas which explicitly relate $f^{1}(N^{\prime})$ to $f^{1}(N^{\prime\prime})$ up to diffeomorphism (by some sort of generalized handle attachment operation?), where $N^{\prime}\subseteq N^{\prime\prime}\subseteq N$ are some reasonable analogues in N to $(\infty,\epsilon]$ and $(\infty,\epsilon]$ correspondingly.
Is there any work, or any results along these lines? Is this all wellknown (and easy?), is it open, or is it known to be impossible (as in: "if the target isn't R then something goes disastrously wrong")?