Refactor out sysconfig handling

Is this import needed?