Created a base class for maps

I moved common functionality for map classes into a BaseMap class that
implements the IMap interface. This pulled a lot of code out of the
SnakeMap class, which I think will make it somewhat easier to read.