fix #58, fix comments, printf/puts to DEBUG