WebApiController refactoring
more general refactoring
and some more general refactoring