Refactored SearchTermService and tests
Refactored SearchTermService and tests