move service classes to lib