Added const declarations to helper functions