Add const where necessary to avoid warnings.