Cleanup and update vim functions