Refactor for easier overriding