removed duplicate code from generics::Controller and webs::Controller