This PR is based on refactoring the quality.js - their were two places to in which repetitous code was used.
The reviewer
There is no javscript testing for qaulity.js
Code is much cleaner and easier to follow.
Totally not appropriate ;-)