Finished refraction - still very buggy