Marked some locals const.