refactored config and local into separate modules