Refactor out sysconfig handling

ok, make sense, only that I need mapping of option to attribute