Comments and bug fix,
moved intersection test to geometry helper