Cleanup and adjust how parameters are stored