added debug printouts and comments

Signed-off-by: Guyzmo <guyzmo+github@m0g.net>