start cleaning up terrain picking code
add some first steps on physics engine code