Added Sasan's changes
Added toggle for refraction