Adding debug module and a lot of debug messages.