Made some variables local scope
Replaced Vertex3f calls with Vertex2f
Found unused variable
Fixed a bug with the elimination of lines