Can now save layers. Fixed a bug with removing layers.