Refactored code into Subject service.