Split method application_controler#resolve.

Just a cleanup/split while reading code.

I was only able to find how to call 1st and last branch in the case statement. So help with testing or hints on how to get there are very welcome!