Refactoring layer code.

Moving all of the layer-specific methods to WWTLayer. Not quite
finished.