Refactor to handle configSource