Simplification of jQuery-like constructor