Work in progress, clean up config and OAuth handling