Refactoring services for more genericity. Source formatting.