Mark some functions as const