Minor prettifications to inner VBO loop.
Various refactoring.

This file is in serious need of cleanup.