More cleanup of service.py