Copyright notice added.
New debug function cw_log_dbg for more granular debuging output.
cw_log_dbg funtion added.