Changed some 'var's to 'const'