Refactored a bit and added config.ini.