Adding const in to appropriate places.