[api] move some model code out of request controller

For now this is just moving code around - but closer to where it belongs. And better merge this after adrian or he jumps up the wall :)