Made some changes to make splint happier- it is a string beast...