small cleaning, debug and comments