Fix some test issues and add missing tests for services