Updated refs to proper const
Refactored to correct const-edness