Refactor config, update docs