It is still incomplete, without anterior collision detection. I'll correct it later.