Simplified code. No effective changes.