refactored WebApi classes