rhbz1064106 - Variable renames and refactoring to remove the need for a mutable integer wrapper.