remove legacy code and add a general config file