Added const to some variables