implementing changes from VIMCPlugin and various other tweaks