Push vd register writes out of dispatchers.
Cleanup some functions.