Rewritten to use built in document.styleSheets

Maybe not necessarily any faster though?