Code Optimizations, added vertex counting