More flexible configuration

Work in progress.