code improvements, new configuration variables