Debugging and adding tests