got refraction partially fixed. the problem was internal reflection
deleted old debug comments
added the todo to trace through points