added new log level 'Debug'
cleanup and cosmetics