Config file support and other minor tweaks