defines to quickly in- or exclude debug code
added missing inlcudes
minor changes