Rewrite imaps to leave insert mode

This was always causing confusion and I think this is more intuitive.