Added css selector based strategy and generalize to apply on href based strategy.
Change some mutexs to atomic operations.