prep (cleanup) for refactoring code to be more modular