Refactoring for Spray integration.
Refactoring for Spray integration.