Added const in appropriate function parameters.