Continuing extend all #151 . Added unit tests for basic selector parts
match&replace and fixed some bugs.  The feature still neats to be cleaned
up and some flows are not covered by tests yet.