Removed reliance on particular DOM structure