Optimization of slow and stored light in atomic vapor