Add const qualifier to some functions