Cleaning stack.py and service.py