Simplified glitch detection scheme. Improved host control.

Simplified the glitch detection scheme. It is more robust over different boards.
Added more host control and signal generation control.