Added config options for controlling the autoend. Request #8