refactor services layer into node module that can be mixed into downstream server types.