The key to rehabilitation for somebody with a diagnosis of arthritis is generally to keep moving within a safe range of motion to both protect the joint but maintain function. Although osteoarthritis and rheumatoid arthritis differ greatly in the mechanism of the problem, maintaining strength, mobility and function is common to both types of arthritis. Treatment is focused on protecting the joint while emphasizing functional goals. Individualized exercise programs with an eye toward alignment are a key component of rehabilitation. Modalities are used for control of pain and swelling, allowing greater ability to focus on range of motion, strength, endurance, and balance.