Fixed what I can on loading layers. Got as far as I can on issue #27.