Refactored wsfed controller to validate/generate response pattern