Code optimization

. The surface detection is no longer static. The optimized code should
allow us to see the surface in real time =)