More compile cleanups and debugging enhancements