Added debugMode levels and unit tests to cover them.