Refactored goals service