Added custom config API, refactored
Closes #2