Fixed muscle and spring classes to remove duplicated code