Removed reliance on JavaScript classList method