WIP: loading and saving layers to mongodb.