#1170 suggestion for the requested refactoring

okay i was too lazy to clone the repository and do this, but with the in-browser its really quick :)