add tests
remove usused lines
fix undefined with service configuration