Use proper limit for terrain intersection test.
Clean up obsolete TODOs.