Add configuration file and some improvements