qvim: clean up the code