Fixed tests and implemented service