Trimming the results properly
Fixed errors in vimscript