Refactored server-side config loading + code cleanup