Accept custom configuration

Take 2. Old: #725.