More cleanup and debugging