Factored import-time code into utility functions