Some config options added to sysvinit template. Small code refactor