Can you add some comments and a debug mode?

I'm trying to debug this runnable, but I'm lost because there are no comments...