Extract interface

Extract an interface for configuration, for it to be extensible in future.
@owolabileg  please review,  thanks!
can you provide an explanation for why you chose to make this an interface? without some idea of what the second implementing class you intend to use to implement this interface is, it becomes unclear what the merit of this diff is.