Added const to function parameters and return values