Some code improvements and a Config file added