Improved configuration file structure and regex handling