Refactored into services