added saving the state of the layers
Merge branch 'develop'