Remove use of getElementsByTagName and getElementsByClassName

Replace calls to these functions with querySelector and querySelectorAll
Merge pull request #369 from sheelc/query-selectors

Query selectors