Target active elements rather than re-querying, use clickElement instead of click, and other cleanup.