add basic structure for config support

See #8.  

This branch will be merged when the feature is finished.