A few minor time-saving changes
Also added an error check if vim doesn't exist