Got refraction working