more progress on code refactoring

The brush-based vmf writer is now working