Reduced code duplication by adding an abstract class for repeated code elements
Use `use` statements for DOM stuff, maybe fix Scrutinizer bug?
Removed extra phpdoc from removed method param
Removed deprecated method setOutput
update from the master branch