Refactor vlf-write.