Clean up sgp.config construction and usage