Added more debug code refs #24