Added a DEBUG flag for... well... debugging