Move config functionality to it's own module