Some speed ups etc

Some fixes, some clean ups, some speed ups.
Remove the part that generated the triangles new for every frame. Not
nice at this position ;). Implemented some helper vars. Started fixing
texture bug. Not done yet.