Add DEBUG mode
Pass -Wall to ghc and fix compiler warnings