refactors for planned integration with pre-commit