Optimized some dependencies, restructured services config