Mapping improvements and cleanup

Hi,

I made a few adjustments to your plug-in involving, most importantly, making the maps configurable. See commit messages for the specifics. I'm opening this pull request to share if interested, but feel free to ignore.

I'll likely be making more changes later such as restoring registers within functions and using getpos()/setpos() instead of marks.