Completed Task1: Simplified ApplyLM to ApplyLM2