Flesh out WMTS code. This does not work yet. WIP

I'm submitting this since it's the end of the course period. This is
unfinished work.