Add config.go and unit test