use MutationObserver to deal with detached, registered, added dom nodes

it also solves dynamic element creation
refactor mutation observer code, stop on first find