refacterd code to use Andrews entity and model for doing crud on category management.