Rearrange application services to to allow cli application to use them