Reduced code duplication by adding an abstract class for repeated code elements
Use `use` statements for DOM stuff, maybe fix Scrutinizer bug?