Allow optional selector argument for delegating events
Rename vars in tests for consistency