Improvements to debug build