Core: Mark some functions as const