The code should be now both cleaner and faster (we're no more calling look(/regex/) repeatedly to decide which at_tag method to call).