Extract interface

Extract an interface for configuration, for it to be extensible in future.
@owolabileg  please review,  thanks!