Apply PEP8
Extract dev_chat/debug option out into a function argument

This replaces the exsiting DEBUG global