Write the code below this line as Python, put it in base.py and write tests for it.

The less VimScript we have, the better.