Refactorings: wc gateway settings API, code cleanup. Fixes #24, closes #22