Improve config model
Make api consistent with other plugins