Implemented refraction. Currently have incorrect direction