Refactor out sysconfig handling

Hardcore Yast. Nice as a learning exercise to me, but please add some comment explaining it for newcomers.