Reorganize vimup code