Merge pull request #1 from chester1000/restruct

Structural change + API change
fix(config): config now doesn't leak