Offload stuff from main python script to something more importable