Added a DEBUG variable and changed formatting

3 warnings/function will be generated but as far as I can tell
everything else looks good