Cleanup
Have api_config be an intelligent object
Reorg/cleanup
Added partial switch helper