Refactor after peer review with @JacobNinja