configfile and source refactor