refactored message service to decouple service from scope content