more config directives, variabled, some logic changes