tweak initialization of service
fix unit tests