Fixed the broken config file handling and rewrote the -l option.