AddHandler regex fixed

plus comments added
code comments and removed a debug print